
const { sequelize, DataTypes } = require('../utill/getSequelize')

//学院表
const T_academy = sequelize.define('T_academy', {
  id: {
    type: DataTypes.INTEGER,
    primaryKey: true,
    autoIncrement: true,
  },

  academy_name: {//学院名字
    type: DataTypes.STRING,
    allowNull: false,
  },

  // invitation_code: {//邀请码
  //   type: DataTypes.STRING,
  //   allowNull: false,
  // },

});


//同步模型和数据库表
(async () => {
  try {
    await sequelize.sync({ force: false });
    console.log('All models were synchronized successfully.');
  } catch (error) {
    console.log(error);
  }

})();

//提供出去
module.exports = { T_academy };